/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package todotask.model;

import java.sql.SQLException;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.DefaultComboBoxModel;
import todotask.Database.Data;
import todotask.entities.Status;


/**
 *
 * @author dakota
 */
public class ListStatusModel extends DefaultComboBoxModel{

    private Data d = new Data();

    public ListStatusModel() {
        try {
            Status[] list = d.getStatus();
            for (Status c : list) {
                addElement(c);
            }
        } catch (SQLException ex) {//Lanzar a una clase gestor de errores
            Logger.getLogger(ListCategoryModel.class.getName()).log(Level.SEVERE, null, ex);
        }
    }
}
